﻿<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<title>JskitAnimation.html</title>
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="this is my page">
	 	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<link rel="stylesheet" type="text/css" href="../main.css">
  	   <script src="../../release/jskit.core.js"></script>

 	   <script src="../JskitConfig_doc.js"></script>
	</head>
	<body>
		<table border="0" id="Table1">
			<tbody>
				<tr>
					<td class="package">
						JskitAnimation.js
					</td>
				</tr>
				<tr>
					<td class="content">
						对象移动
					</td>
				</tr>
				<tr>
					<td class="title">
						Author:
					</td>
				</tr>
				<tr>
					<td class="content">
						AnyRock
					</td>
				</tr>
				<tr>
					<td class="title">
						Initializtion:
					</td>
				</tr>
				<tr>
					<td class="content">
						var ani = new JskitAnimation("ani");
					</td>
				</tr>
				<tr>
					<td class="title">
						Required:
					</td>
				</tr>
				<tr>
					<td class="content">
						core/*
					</td>
				</tr>
				<tr>
					<td class="title">
						Methods:
					</td>
				</tr>
				<tr>
					<td class="content">
						<table border="1" cellspacing="0" class="content_list" id="Table2">
							<thead>
								<tr bgcolor="#cccccc">
									<td>
										Name
									</td>
									<td>
										Parameters
									</td>
									<td>
										Return
									</td>
									<td>
										Comment
									</td>
								</tr>
							</thead>
							<tbody>
								<tr>
									<td>
										moveTo(HTMLElement rObj,Float rX,Float rY[,Int rSpeed][,String rOnFinish])
									</td>
									<td>
										rObj : 移动的对象
										<br>rx : 目标x坐标
										<br>ry : 目标y坐标
										<br>rSpeed : 移动速度(10-100之间的整数,数值越大速度越快,缺省为50)
										<br>rOnFinish : 移动结束之后触发的Methods:
									</td>
									<td>
										
									</td>
									<td>
										将对象移动到某一个位置
									</td>
								</tr>
								<tr>
									<td>
										move(HTMLElement rObj,Array rPath[,Int rSpeed][,String rOnFinish])
									</td>
									<td>
										rObj : 移动的对象
										<br>rPath : 移动的轨迹,由一组x,y坐标数组组成
										<br>rSpeed : 移动速度(大于1的整数,数值越大速度越快,缺省为10)
										<br>rOnFinish : 移动结束之后触发的Methods:
									</td>
									<td>
										
									</td>
									<td>
										将对象移动到某一个位置
									</td>
								</tr>
								<tr>
									<td>
										transform(HTMLElement rObj,Float rX,Float rY,Float rWidth,Float rHeight[,Int rSpeed][,String rOnFinish])
									</td>
									<td>
										rObj : 移动的对象
										<br>rx : 目标x坐标
										<br>ry : 目标y坐标
										<br>rWhdth : 目标宽度
										<br>rHeight: 目标高度
										<br>rSpeed : 移动速度(10-100之间的整数,数值越大速度越快,缺省为50)
										<br>rOnFinish : 移动结束之后触发的Methods:
									</td>
									<td>
										
									</td>
									<td>
										将对象移动到某一个位置的同时改变大小
									</td>
								</tr>
							</tbody>
						</table>
					</td>
				</tr>
				<tr>
					<td class="title">
						Example:
					</td>
				</tr>
				<tr>
					<td class="content">
						<a href="../demo/demo_animation.html">查看效果演示页面 </a>
						<br><br>
						moveTo():,将一个对象移动到指定的位置
						<textarea  name="JskitSyntax_code" class="js">
							 var obj = $$("#a");
							 var ani = new JskitAnimation("ani");
							 ani.moveTo(obj,100,200,30,"alert('ok!')");
						</textarea>
						<br><br>
						move():,将一个对象按一定的轨迹移动
						<textarea  name="JskitSyntax_code" class="js">
							 var obj = $$("#a");
							 var ani = new JskitAnimation("ani");
							 var path = new Array();
							 for(var i=-10;i<=10;i++){
									var x = 500 + 30*i;
									var y = 200 + 100*Math.sin(Math.PI*i/5);
									path.push(new Array(x,y));
							 }
							 ani.move(obj,path,2);		
						</textarea>
						<br><br>
						transform():,将一个对象变形并移动到指定位置
						<textarea  name="JskitSyntax_code" class="js">
							 var obj = $$("#a");
							 var ani = new JskitAnimation("ani");
							 ani.transform(obj,350,700,200,200,10);	
						</textarea>
					</td>
				</tr>
			</tbody>
		</table>  
	</body>
</html>
